<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;" lang="en">
<head>



  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">



  <title>COID limitations</title>
</head>


<body>



<b> <br>


<center>
<h1>COID  - Limitations</h1>
</center>

 <br>


 </b>
<ul>

  <li>  There
are certain data transfer limitations. You cannot directly transfer
pointers<a href="#1"><sup style="color: rgb(51, 51, 255); font-weight: bold;">1</sup></a>. Typically server and client run in different processes, so it
wouldn't make sense to do so. What can and what cannot be declared as a
function argument is listed&nbsp;here: <a href="http://coid.sourceforge.net/function_argument_format.html">Function argument format</a> <br>

     </li>

</ul>



<ul>

  <li>  The
exported class may contain a constructor, but it must not have
arguments. If you want to use arguments when you create your class, use
 <code> accept_connect()</code>.<br>

    There is also the <code>accept_connect_shared()</code> and the  <code>accept_connect_auto()</code> method. For more information about this read&nbsp;<a href="http://coid.sourceforge.net/coid.html"></a><a href="../coid.html#methods">Special methods</a><br>

Another way of initialization of you object is to use <code>accept_startup_params()</code> routine.<br>

  </li>

</ul>

<ul>

  <li>

Custom  data types:<br>

Because coid transfers data through the network pipe and doesn't know
what it is transferring, you are responsible for writing operators <code>&lt;&lt;</code> and <code>&gt;&gt;</code>
that stream your custom objects. For the basic data types the stream
operators are already written. If you use only non-pointer members,
it's easy, just implement them as raw read/write (if they have a
trivial copy constructor) or use sequence of operators on all members.
But if your object contains pointers, you must use more sophisticated
methods to be able to restore them on the opposite side of the network.  </li>

</ul>

<ul>

  <li>  It is recommended to use the data type&nbsp;<code>opcd</code> as return code.&nbsp;<code>opcd</code> is responsible for the error handling. More about opcd in&nbsp;<a href="http://coid.sourceforge.net/opcd_type.html">opcd_type</a>.  </li>

</ul>

<ul>

  <li> Template classes cannot be exported by coid.  </li>

</ul>

<ul>

  <li>Every method argument must have a name.  </li>

</ul>


<ul>

  <li>Only one exported class per header is supported (yet), but more headers per device are allowed.</li>

</ul>
<br>
<a name="1"></a>1&nbsp;&nbsp;&nbsp; If you prefix&nbsp;your argument with <span style="font-weight: bold;">net_ptr</span>, you can directly transfer pointers. Restricting the method to be&nbsp;be accessible in direct mode only with <span style="font-weight: bold;">net_fnc_d</span>
export keyword (that's when client and server object reside in the same
process) is probably the only reasonable way to use the net_ptr with.

</body>
</html>
